package persistent;

import java.sql.Connection;
import java.sql.ResultSet;

public interface IPersistent {

	//open connect database
	public Connection open( String hostip, //Address server
									String database,//database name
									String username,//user name
									String password ) //password user
									throws Exception;
	
	//close connection
	public boolean close( Connection connection ) throws Exception;
	
	//status connection
	//public Boolean status( Connection connection ) throws Exception;
	
	//execute query
	public ResultSet executeQuery( Connection connection, String query ) throws Exception;
	
	//update query
	public int executeUpdate( Connection connection, String query ) throws Exception;
	
}
